using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class StandNameMap : EntityTypeConfiguration<StandName>
    {
        public StandNameMap()
        {
            // Primary Key
            this.HasKey(t => t.Stand_ID);

            // Properties
            this.Property(t => t.StandName1)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.HospitalId)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("StandName");
            this.Property(t => t.Stand_ID).HasColumnName("Stand_ID");
            this.Property(t => t.StandName1).HasColumnName("StandName");
            this.Property(t => t.HospitalId).HasColumnName("HospitalId");
            this.Property(t => t.ljsc).HasColumnName("ljsc");
        }
    }
}
